 <?php
	class page_base {
		protected static $corps;
		private $page;
		
		// Permet d'afficher le contenu de chaque page
		public function __construct($p) {
			$this->page = $p;
		}
		
		/**
		 * ****** Gestion des setters ******************
		 */
		public function __set($propriete, $valeur) {
			switch ($propriete) {
				case 'corps' :
					{
						$this->corps = $valeur;
						break;
					}
				case 'titre' :
					{
						$this->titre = $valeur;
						break;
					}
			}
		}
		public function __get($propriete) {
			switch ($propriete) {
				case 'corps' :
					{
						return $this->corps;
						break;
					}
				case 'titre' :
					{
						return $this->titre;
						break;
					}
			}
		}
		protected function affiche_contenu() {
			echo $this->corps;
		}
		protected function affiche_doc_header() {
			?>
<div class="bs-docs-header" id="content">
	<div class="container">
		<h1>CSS</h1>
		<p>Global CSS settings, fundamental HTML elements styled and enhanced
			with extensible classes, and an advanced grid system.</p>
		<div id="carbonads-container">
			<div class="carbonad">
				<div id="azcarbon"></div>
				<script>var z = document.createElement("script"); z.async = true; z.src = "http://engine.carbonads.com/z/32341/azcarbon_2_1_0_HORIZ"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script>
			</div>
		</div>

	</div>
</div>
<?php
		}
		protected function affiche_notification_center(){
		}
		/**
		 * ***********Gestion des styles ********************
		 */
		private function affiche_style() {
			?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description"
	content="Service d'administration du logicien Oremia">
<meta name="author" content="Pelletier Jordan">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="styles/js/jquery.js"></script>
<script src="js/ajax.js" type="text/javascript"></script>
<script src="styles/js/monthpicker.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<script type="text/javascript" src="styles/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="styles/js/bootstrap.js"></script>
<script type="text/javascript" src="styles/js/bootbox.min.js"></script>
<script type="text/javascript" src="styles/js/raphael.js"></script>
<script type="text/javascript" src="styles/js/popup.js"></script>
<script type="text/javascript" src="js/Scroll.js"></script>
<script type="text/javascript" src="styles/js/sidebar.js"></script>
<script type="text/javascript" src="js/SearchTable.js"></script>
<script type="text/javascript" src="js/FixedHead.js"></script>
<script type="text/javascript" src="js/notification.js"></script>
<link rel="shortcut icon" href="styles/favicon.png">
<link rel="stylesheet" href="styles/css/jquery-ui.css" />
<link href="styles/css/bootstrap.css" rel="stylesheet">
<link href="styles/css/style.css" rel="stylesheet">
<?php
		}
		
		/**
		 * ************ Affichage du pied de la page **************************
		 */
		private function affiche_footer() {
			?>
<hr>
<i>&copy; 2015 <a href="http://www.zumatec.com/" target="blank">Zumatec</a>,
	tous droits r&eacuteserv&eacutes.
</i>
<?php
		}
		
		/**
		 * ************ Affichage du menu de la page (non connecté)**************************
		 */
		protected function affiche_menu() {
			?>
<div class="navbar navbar-default navbar-fixed-top">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" id="logo" href="#"></a>
		</div>

		<div class="collapse navbar-collapse"
			id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li><a href="index.php" id="AddClient">Accueil</a></li>
				<li><a href="connexion.php" id="GestClient">Connexion</a></li>
			</ul>
		</div>
		<!--/.nav-collapse -->
	</div>
</div>
<?php
		}
		/**
		 * ****************** Fonction permettant l'affichage de la page *************
		 */
		public function affiche() {
			?>
<!DOCCTYPE html>
<html lang='fr'>
<head>
<title>Oremia - Administration</title>
				<?php
			$this->affiche_style ();
			?>
			</head>
<body>
				<?php
			$this->affiche_menu ();
			$this->affiche_notification_center();
			//$this->affiche_doc_header ();
			?>
			<div class="row">
			<?php 
			$this->affiche_contenu ();
			
			?>
</div>				
</div>
</body>
<footer class="bs-docs-footer">
	<script type="text/javascript">
	$(window).on('beforeunload', function() {
	    $(window).scrollTop(0);
	});
			</script>
				<?php
			$this->affiche_footer ();
			?>
			</footer>
</html>
<?php
		}
	}
	?>